- page_title "广播信息"

%h3.page-title
  广播信息
%p.light
  广播信息会显示给全部用户，可以用于通知用户系统定期维护、近期计划升级等信息。

= render 'form'

%br.clearfix

-if @broadcast_messages.any?
  %table.table
    %thead
      %tr
        %th 状态
        %th 预览
        %th 开始
        %th 结束
        %th &nbsp;
    %tbody
      - @broadcast_messages.each do |message|
        %tr
          %td
            = broadcast_message_status(message)
          %td
            = broadcast_message(message)
          %td
            = message.starts_at
          %td
            = message.ends_at
          %td
            = link_to icon('pencil-square-o'), edit_admin_broadcast_message_path(message), title: '编辑', class: 'btn btn-xs'
            = link_to icon('times'), admin_broadcast_message_path(message), method: :delete, remote: true, title: '删除', class: 'js-remove-tr btn btn-xs btn-danger'

  = paginate @broadcast_messages, theme: 'gitlab'
